package com.ymatou.iapi.userservice.service;

import java.util.HashMap;
import java.util.Map;

import com.google.gson.Gson;
import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;
/**
*获取用户信息接口Call
*FreeMaker Template自动生成代码
*/
public class UserRequestDtoCall extends YmatouBaseCall{
	private static String opurl ="json/reply/UserRequestDto";
	
	public UserRequestDtoCall() {
		super(EnvSetup.getSystemUrl("userservice_iapi"),opurl,"GET","PARAM");
	}
	
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	/**
	 * 返回结果信息
	 */
	public Map<String, Object> getResult(){
		Map<String, Object> result = new HashMap<String, Object>();
		try{
			result = new Gson().fromJson(getString("Result"), Map.class);
			}catch(Exception e){
			e.printStackTrace();
		}
		return result;
	}
}